package demo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 74646
 * Date: 2022-02-14
 * Time: 15:58
 */
public class TestDemo2 {
    public static void main(String[] args) {
        StringBuilder sb1 = new StringBuilder();
        StringBuffer sb2 = new StringBuffer();
    }

    public static void main2(String[] args) {
         String str = "abcde";
         StringBuilder sb = new StringBuilder();
         sb.append(str);
        for (int i = 0; i < str.length(); i++) {
            sb.append(i);
        }
        System.out.println(sb);
    }

    public static void main1(String[] args) {
        StringBuilder sb = new StringBuilder();
        //String str = "hello";
        sb.append(sb);
       // str +="abc";
        sb.append("abc");
       String ret = sb.toString();
        System.out.println(ret);
    }
}

